package com.cjj.navtong;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class MainActvity extends Activity {

	Intent intent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		intent = new Intent(MainActvity.this, TaskListActivity.class);
		findViewById(R.id.button1).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// 网络加载任务列表
				intent.putExtra("type", TaskListActivity.TYPE_INTERNET);
				startActivity(intent);
			}
		});
		findViewById(R.id.button2).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// 本地任务列表
				intent.putExtra("type", TaskListActivity.TYPE_LOCAL);
				startActivity(intent);

			}
		});
	}
}
